<template>
	<view class="box bg-f7">
		<video :src="info.video_file"  :title="info.title" controls autoplay></video>
		<view class="padding-30 bg-white margin-b-20">
			<view class="color-0 fs-32 fw-b margin-b-20">{{info.title}}</view>
			<view class="fs-24 color-80">{{info.createtime}}</view>
		</view>
        <view class="bg-white">
            <view class="padding-30 fs-32 color-0 fw-b">简介 </view>
            <view class="fs-24 color-80 padding-30">
                {{info.content}}
            </view>
        </view>
        <view class="padding-l-r-30 btn-box" >
            <view class="fs-28 color-white btn border-radio-14 bg-43" @click="goAnswer">
                我要答题
            </view>
        </view>
	</view>
</template>

<script>
import {healthartDetail} from "@/api/healthPassbook";

export default{
		data(){
			return {
				info:{ },
                id:''
			}
		},
        onLoad(options){
			this.id = options.id
		},
        onShow(){
            this.getVideoDetails()
        },
        methods:{
            getVideoDetails(){
                healthartDetail({healthart_id:this.id}).then(res=>{
                    if (res.code ==1){
                        this.info = res.data
                    }
                })

            },
			goAnswer(){
				uni.navigateTo({
					url:'/pageA/healthPassbook/answer?id='+ this.id
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
.box {
    padding-bottom: 168rpx;
}
.btn-box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-top: 10rpx;
    border-radius: 0;
    height: 162rpx;
    background: #fFF;
    .btn {
        height: 90rpx;
        line-height: 90rpx;
        text-align: center;
    }
}
</style>